<script setup>
defineProps({
  good: {
    type: Object
  }
})
</script>

<template>
  <router-link class="item">
    <img :src="good.picture" alt="">
    <p class="name">{{ good.name }}</p>
    <p class="desc ellipsis">{{ good.desc }}</p>
    <p class="price">{{ good.price }}</p>
  </router-link>
</template>

<style lang="less" scoped>
.item {
  display: block;
  width: 220px;
  padding: 20px 30px;
  text-align: center;
  &:hover {
    transition: all .5s;
    transform: translateY(-3px);
    box-shadow: 0 0 5px rgba(0, 0, 0, .3);
  }
  img {
    width: 160px;
    height: 160px;
  }
  .name {
    font-size: 16px;
  }
  .desc {
    margin-top: 5px;
    color: #999;
    width: 100%;
  }
  .price {
    margin-top: 10px;
    font-size: 20px;
    color: @priceColor;
  }
}
</style>